//
//  Array++.swift
//  YXRSmartDeviceDemo
//
//  Created by run on 2024/7/11.
//

import Foundation

extension Array {
    func toIdentifiable() -> [IdentifiableModel<Element>] {
        return map { IdentifiableModel($0) }
    }
}

struct IdentifiableModel<T>: Identifiable {
    let id: UUID = .init()
    let value: T

    init(_ value: T) {
        self.value = value
    }
}
